from django.shortcuts import render

from .models import Blog
# Create your views here.

def index(request):
    blogs = Blog.objects.all()#相当于查找数据库 查询所有文章
    print(blogs)
    return render(request,"index.html",{"blog":blogs})